package com.bdult.vh.dao;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.bdult.vh.vo.ItemVO;

@Repository
public class CommDAO implements CommonDAO {
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;
	
	public int updateSequence(String sKeyID) {
		return sqlSessionTemplate.update("updateSequence", sKeyID);
	}
	
	public int insertSequence(String sKeyID) {
		return sqlSessionTemplate.insert("insertSequence", sKeyID);
	}
	
	public int selectSequence(String sKeyID) {
		return (Integer) sqlSessionTemplate.selectOne("selectSequence", sKeyID);
	}

	//###### 2014-05-03 심윤 추가 : 주문관련
	public int insertPoint(Map<String, Object> paramMap) {
		return sqlSessionTemplate.insert("insertPoint", paramMap);
	}
	//###### 2014-05-03 심윤 추가 : 주문관련
	
	//###### 2014-05-05 심윤 추가 : 공통코드조회
	public ArrayList<HashMap<String, String>> selectCodeList(String comCD) {
		return (ArrayList<HashMap<String, String>>)sqlSessionTemplate.selectList("selectCode", comCD);
	}
	//###### 2014-05-05 심윤 추가 : 공통코드조회
}
